package com.kl.modular.system.dao.model;


import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import org.apache.commons.lang3.StringUtils;

/**
 * 操作日志
 * @author kl_zjb
 * @date 2017-01-17 16:48
 * @(C) kongling Copyright 
 */
public class SystemLog {	
	
	public static final String LOG_DATA_TYPE_READ = "READ";// 读取查看
	public static final String LOG_DATA_TYPE_UPDATE = "UPDATE";// 更新数据
	public static final String LOG_DATA_TYPE_INSERT = "INSERT";// 新增数据
	public static final String LOG_DATA_TYPE_DELETE = "DELETE";// 删除数据

    public static final String LOG_TYPE_SYSTEM_LOGIN = "登陆系统";

    public final static String SECURITY_END = "SECURITY_END";// 公安端


    public static final String LOG_TYPE_SEC_IMPCERTCK = "进口证核查";
    public static final String LOG_TYPE_SEC_EXPORTREG = "出口登记";

	public SystemLog(){}

    /**
     * 构造函数
     * @param dataObjectType 数据对象
     * @param name 操作权限地址
     * @param personId 人员Id
     * @param personName 人员name
     * @param organsName 机关名称
     * @param methodUrl 方法地址
     * @param logTypeCode 日志类型
     * @param tableName 表名
     * @param tableId 表id
     * @param dataMd5 数据msd5
     * @param logIp ip地址（外网IP）
     * @param clientInfo 客户端信息
     * @param logDataCode 操作数据类型
     * @param logContent 操作基本解释
     */
	public SystemLog(String dataObjectType,
                     String name,
                     Long personId,
                     String personName,
                     String organsName,
                     String methodUrl,
                     String logTypeCode,
                     String tableName,
                     String tableId,
                     String dataMd5,
                     String logIp,
                     String clientInfo,
                     String logDataCode,
                     String logContent) {
	    this.dataObjectType = dataObjectType;
	    this.name = name;
	    this.methodUrl = methodUrl;
	    this.tableName = tableName;
	    this.tableId = tableId;
	    this.dataMd5 = dataMd5;
	    this.logIp = logIp;
		this.logDataCode = logDataCode;
		this.logTypeCode = logTypeCode;
		this.logContent = logContent;
        this.clientInfo = clientInfo;
        this.personId = personId;
        this.personName = personName;
        this.organsName = organsName;
	}

	
	/**  */
	@TableId()
    private Long id;

    /** 表 */
    private String tableName;

    /** 表ID */
    private String tableId;

    /** 名称 */
    private String name;

    /** 方法地址 */
    private String methodUrl;

	/** 数据code */
    private String dataMd5;
    
	/** 操作人 */
    private String adminCode;

    /** 人员名称 */
    private String personName;

    /** 人员id */
    private Long personId;

    /** 机关名称 */
    private String organsName;
    
	/** 操作内容详情 */
    private String logContent;
    
	/** 操作外网ip */
    private String logIp;
    
	/** 数据动作 查看 更新 新增 删除 */
    private String logDataCode;
    
	/** 类型code */
    private String logTypeCode;

    /** 数据对象类型 */
    private String dataObjectType;
    
    /** 客户端信息 */
    private String clientInfo;
    
	/** 最后操作时间 */
    private String modifyTime;
    
	/** 创建时间 */
    private String createTime;
    
	/** 数据有效性 */
    private Boolean enabled;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getTableId() {
        return tableId;
    }

    public void setTableId(String tableId) {
        this.tableId = tableId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMethodUrl() {
        return methodUrl;
    }

    public void setMethodUrl(String methodUrl) {
        this.methodUrl = methodUrl;
    }

    public String getDataMd5() {
        return dataMd5;
    }

    public void setDataMd5(String dataMd5) {
        this.dataMd5 = dataMd5;
    }

    public String getAdminCode() {
        return adminCode;
    }

    public void setAdminCode(String adminCode) {
        this.adminCode = adminCode;
    }

    public String getPersonName() {
        return personName;
    }

    public void setPersonName(String personName) {
        this.personName = personName;
    }

    public Long getPersonId() {
        return personId;
    }

    public void setPersonId(Long personId) {
        this.personId = personId;
    }

    public String getOrgansName() {
        return organsName;
    }

    public void setOrgansName(String organsName) {
        this.organsName = organsName;
    }

    public String getLogContent() {
        return logContent;
    }

    public void setLogContent(String logContent) {
        this.logContent = logContent;
    }

    public String getLogIp() {
        return logIp;
    }

    public void setLogIp(String logIp) {
        this.logIp = logIp;
    }

    public String getLogDataCode() {
        return logDataCode;
    }

    public void setLogDataCode(String logDataCode) {
        this.logDataCode = logDataCode;
    }

    public String getLogTypeCode() {
        return logTypeCode;
    }

    public void setLogTypeCode(String logTypeCode) {
        this.logTypeCode = logTypeCode;
    }

    public String getDataObjectType() {
        return dataObjectType;
    }

    public void setDataObjectType(String dataObjectType) {
        this.dataObjectType = dataObjectType;
    }

    public String getClientInfo() {
        return clientInfo;
    }

    public void setClientInfo(String clientInfo) {
        this.clientInfo = clientInfo;
    }

    public String getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(String modifyTime) {
        this.modifyTime = modifyTime;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public Boolean getEnabled() {
        return enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }
}